package com.duobaoyu.dby.supply.db.entity.extend;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 参数扩展信息
 *
 * @author fengshaoyu
 * @version 1.0.0
 * @date 2023/10/27 15:06
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OrderProductParamExtendInfo {

	/**
	 * 油卡类型,0:中石化、1:中石油
	 */
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private Integer oilCardType;

	/**
	 * 电费信息
	 */
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private OrderProductParamExtendInfo.ElectricityFees electricityFees;

	/**
	 * 手机运营商
	 */
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private OrderProductParamExtendInfo.PhoneOperator phoneOperator;
	/**
	 * 商品阶梯价格
	 */
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private List<OrderProductParamExtendInfo.Price> tieredPrice;

	@Data
	@Builder
	@AllArgsConstructor
	@NoArgsConstructor
	@JsonInclude(JsonInclude.Include.NON_NULL)
	public static class Price {
		/**
		 * 包装规格
		 */
		private String batchPackageNum;
		/**
		 * 规格起发量
		 */
		private String batchStartNum;
		/**
		 * 规格单价
		 */
		private BigDecimal batchSellPrice;
		/**
		 * 税率
		 */
		private String taxRate;
	}

	/**
	 * 电费充值参数
	 */
	@Data
	@JsonInclude(JsonInclude.Include.NON_NULL)
	public static class ElectricityFees implements Serializable {
		private static final long serialVersionUID = 7008712035521022795L;
		/**
		 * 电费运营商类型
		 */
		private String operator;
		/**
		 * 电费 省编码
		 */
		private String provinceCode;
		/**
		 * 电费 省名称
		 */
		private String provinceName;
		/**
		 * 电费 市编码
		 */
		private String cityCode;
		/**
		 * 电费 市名称
		 */
		private String cityName;
		/**
		 * 充值电费证件号 （身份证后六位 / 营业执照后六位 / 银行卡后六位
		 */
		private String certificatesNo;

		/**
		 * 充值电费证件型 1身份证后六位 2营业执照后六位 3银行卡后六位
		 */
		private Integer certificatesType;
	}

	/**
	 * 手机运营商参数
	 */
	@Data
	@JsonInclude(JsonInclude.Include.NON_NULL)
	public static class PhoneOperator implements Serializable {
		private static final long serialVersionUID = 3553238499342284100L;
		/**
		 * 渠道商品编码
		 */
		private String channelProductCode;
		/**
		 * 充值流量值（M）
		 */
		private Integer flowValue;
		/**
		 * 运营商
		 */
		private String operatorName;
		/**
		 * 运营商类型 1:移动 2:电信 3:联通
		 */
		private Integer operatorType;
		/**
		 * 归属地省名称
		 */
		private String provinceName;
		/**
		 * 归属地城市名称
		 */
		private String cityName;
	}

}
